<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<c:set value="${requestScope.response.data.one }" var="one"/>
<c:set value="${requestScope.ordersProductResponse.data.list }" var="ordersProductList"/>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>订单详情 - 美妆产品销售系统</title>
		<%@ include file="/common/include/head_title.jsp"%>
	</head>
	<body>
		<jsp:include page="/IndexHeadServlet">
			<jsp:param value="header" name="method"/>
		</jsp:include>
		<section class="page-content-wrapper login-area ptb-100">
			<div class="container">
				<div class="row">
					<div class="col-md-12 col-sm-12 col-xs-12">
						<h2 class="sub-header">订单详情</h2>
						<div class="billing-fields row">
							<p class="form-row col-sm-12">
								<label for="billing_address_1">用户:</label> ${one.users.nick }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">姓名:</label> ${one.name }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">手机:</label> ${one.phone }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">地址:</label> ${one.addr }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">总金额:</label> ${one.totalMoney }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">状态:</label> ${one.statusStr }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">备注:</label> ${one.note }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">下单时间:</label> ${one.createTime }
							</p>
							<p class="form-row col-sm-12">
								<label for="billing_address_1">更新时间:</label> ${one.updateTime }
							</p>
						</div>
					</div>
					
				   <div class="col-md-12 col-sm-12 col-xs-12">
				   		<h2 class="sub-header">订单明细</h2>
						<div class="table-content table-responsive">
							<table>
								<thead>
									<tr>
										<th class="product-thumbnail">序号</th>
										<th class="product-thumbnail">图片</th>
										<th class="product-name">名称</th>
										<th class="product-price">价格</th>
										<th class="product-quantity">数量</th>
										<th class="product-subtotal">总价格</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${ordersProductList }" var="listTemp" varStatus="stat">
										<tr>
											<td class="product-thumbnail">${stat.count }</td>
											<td class="product-thumbnail">
												<a href="${rootPath }/IndexHeadServlet?method=productInfo&id=${listTemp.prodId }" target="_blank" title="${listTemp.product.name }">
													<c:choose>
														<c:when test="${listTemp.product.pic != null && listTemp.product.pic != '' }">
															<a href="${websiteFileUrl}${listTemp.product.pic }" target="_blank">
																<img alt="" src="${websiteFileUrl}${listTemp.product.pic }" width="130" height="130">
															</a>
														</c:when>
														<c:otherwise>
															<img alt="" src="${rootPath }/img/no_pic.png" width="130" height="130">
														</c:otherwise>
													</c:choose>
												</a>
											</td>
											<td class="product-name">
												<a href="${rootPath }/IndexHeadServlet?method=productInfo&id=${listTemp.prodId }" target="_blank" title="${listTemp.product.name }">
													${fn:substring(listTemp.product.name,0,subStrLen) }
												</a>
											</td>
											<td class="product-price"><span class="amount">Y${listTemp.product.price }</span></td>
											<td class="product-quantity">${listTemp.num}</td>
											<td class="product-subtotal">${listTemp.product.price * listTemp.num }</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</section>
		<%@ include file="/common/include/head_footer.jsp"%>
	</body>
</html>